

from django.conf import settings
from django.db.models import CharField, ForeignKey, CASCADE, SET_NULL, IntegerField

# 继承框架封装的 模型类 CoreModel

from apps.vadmin.op_drf.models import  BaseModel


class StockModelInst(BaseModel):
    modelId = IntegerField(verbose_name="模板id")
    sampleName = CharField(max_length=128, verbose_name='产品名称')
    remark = CharField(max_length=256, verbose_name='备注')
    # 在关联用户时，建议使用 to=settings.AUTH_USER_MODEL 进行关联
    class Meta:
        verbose_name = '模板对应产品配置'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.sampleName} 项目"
